<if condition="!empty($_GET['appId']) and !empty($_GET['moduleId'])" >
	<include file="./Tpl/Role/actionfrag/action.html" />

<elseif condition="!empty($_GET['appId'])" />
	<include file="./Tpl/Role/actionfrag/module.html" />

<else />
	<form id="setActionAction" method="post" action="__URL__/setAction" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<input type="hidden" name="groupId" VALUE="{$Think.get.groupId}" />
		<div class="pageFormContent" layoutH="100" layoutType="dialog">
			<div class="unit">
				<label>Applicaion:</label>
				<select name="appId" onchange="selectApp_action('#setActionAction')">
					<option value="">Choose</option>
					<volist id="item" name="appList">
					<option value="{$key}" <?php echo in_array($key, $selectAppId) ? "selected" : "" ?>>{$item}</option>
					</volist>
				</select>
			</div>
			<div id="moduleSelectBox">
				<include file="./Tpl/Role/actionfrag/module.html" />
			</div>
		</div>
		<div class="formBar">
			<label style="float:left"><input type="checkbox" class="checkboxCtrl" group="groupActionId[]" />全选</label>
			<ul>
				<li><div class="button"><div class="buttonContent"><button type="button" class="checkboxCtrl" group="groupActionId[]" selectType="invert">反选</button></div></div></li>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" onclick="$.pdialog.closeCurrent()">取消</button></div></div></li>
			</ul>
		</div>
	</form>
</if>
